package com.vhall.component.entity.logger.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.vhall.component.framework.common.annotation.ParamName;
import com.vhall.component.plugin.common.enums.OperateTypeEnum;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@Data
public class OperateLogPageReqVO {

    /**
     * String
     * 限制：50字符
     */
    @ParamName(value = "module")
    private String module;

    /**
     * String
     */
    @ParamName(value = "user_nickname")
    @JsonProperty(value = "user_nickname")
    private String userNickname;

    /**
     * Integer
     * 操作分类 {@link OperateTypeEnum}
     * 1 查询；2新增；3修改；4删除；5导出；6导入；0其它
     */
    @ParamName(value = "type")
    private Integer type;

    /**
     * Boolean
     * true成功，false 失败
     */
    @ParamName(value = "success")
    private Boolean success;

    /**
     * 时间格式 yyyy-MM-dd HH:mm:ss
     * 例子 [2022-07-01 00:00:00,2022-07-01 23:59:59]
     */
    @ParamName(value = "start_time")
    @JsonProperty(value = "start_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime[] startTime;

    /**
     * Integer
     */
    @ParamName("page")
    private Integer page = 1;

    /**
     * Integer
     */
    @ParamName("pagesize")
    private Integer pagesize = 10;

}
